package com.jfok.shared.service;

import java.io.IOException;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.jfok.shared.module.DataDeleteResponseInfo;
import com.jfok.shared.module.DataInsertResponseInfo;
import com.jfok.shared.module.DataUpdateResponseInfo;


public interface IModuleService {
	
	public Map<String, Object> fetchData(String moduleName, Integer start, Integer limit,
			String sort, String query, String columns, String navigates, String parentFilter,
			HttpServletRequest request);

	
	public Object getRecordNewDefault(String moduleName, String parentFilter, String navigates,
			HttpServletRequest request);

	// 根据ＩＤ，module id 取得记录
	public Object getRecordById(String moduleName, String id, HttpServletRequest request);

	public DataInsertResponseInfo add(String moduleName, String inserted, HttpServletRequest request);

	public DataUpdateResponseInfo update(String moduleName, String id, String oldid, String formtype,
			String updated, HttpServletRequest request);

	public DataDeleteResponseInfo remove(String moduleName, String id, HttpServletRequest request);

	public void exportDataExecl(String moduleName, Integer schemeOrder, String sort, String group,
			String query, String columns, String navigates, String parentFilter,
			HttpServletRequest request, HttpServletResponse response) throws IOException;

	public void exportRecordExcel(String moduleName, String id, String title, String schemeId,
			HttpServletRequest request, HttpServletResponse response) throws IOException;

	public String printRecordExcel(String moduleName, String id, String schemeId,
			HttpServletRequest request, HttpServletResponse response) throws IOException;
}
